package cn.itcast.scala

class Dog {
  val id = 110
  private var name = "erha"

  def printName():Unit = {
    println(Dog.constant + name)
  }
}

object Dog {
  private var constant = "wangwang..."

  def main(args: Array[String]): Unit = {
    val dog = new Dog
    dog.name = "haha"
    dog.printName()
  }
}
